package com.tianqu.tms.www.car.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tianqu.tms.core.base.Logger;
import com.tianqu.tms.core.base.TmsAction;
import com.tianqu.tms.core.base.UserContext;
import com.tianqu.tms.core.util.TmsConstants;
import com.tianqu.tms.www.car.controller.CarPrivilegedCarManageController;
import com.tianqu.tms.www.car.viewhelper.CarPrivilegedCarManageViewHelper;

/**
   *  收费车管理-初期显示
 * 
 * @author rzd
 *
 */
public class CarChargeFeeManageAction extends TmsAction {
	
	private Logger logger = Logger.getLogger(CarChargeFeeManageAction.class);

	@SuppressWarnings("unchecked")
	@Override
	protected ActionForward doAction(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response,
			UserContext uc) throws Exception {
		logger.debug(this.getClass().getName() + "#execute was called.");

//		CarPrivilegedCarManageViewHelper view = new CarPrivilegedCarManageViewHelper();
//	    uc.setAttribute(TmsConstants.VIEWHELP, view);
//
//	    CarPrivilegedCarManageController controller = new CarPrivilegedCarManageController();
//		controller.execute(uc);
//		
//		@SuppressWarnings("rawtypes")
//		List list = (List)uc.getAttribute(TmsConstants.VIEWHELP);
//		view.setPrivilegedCarList(list);
//		
//		// 直接把list打到前台
//		request.setAttribute(TmsConstants.VIEWHELP, view);
		
		logger.debug(this.getClass().getName() + "#doAction was completed.");
		return mapping.findForward(TmsConstants.SUCCESS);
	}
}
